<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/4/7
 * Time: 1:06
 */

namespace app\common\validate;


use think\Validate;

class Articles extends Validate
{
    protected  $rule = [
        'title|标题' => 'require',
        'class_id|分类' =>  'require|integer',
        'content|内容' => 'require',

        'tag|标签' => 'require',
        'defaulePageview|初始浏览量' => 'require|integer',
        'level|级别' => 'require|integer',
        'homeShow|首页展示' => 'require',
        'listStyle|样式' => 'require',
        'file|附件' => 'require',
        'releaseAt|发表时间' => 'require',

    ];

    //添加基地场景验证
    public function sceneAdd(){
        return $this->only(['title','class_id']);
    }


}